//
//  Direct.m
//  Wsj2017_构建者模式_1
//
//  Created by macOS on 2017/4/21.
//  Copyright © 2017年 macOS. All rights reserved.
//

#import "Direct.h"

@interface Direct ()

@property(nonatomic) id<IComputerBuilder> builder;

@end

@implementation Direct

- (instancetype)initWithBuilder:(id<IComputerBuilder>)builder
{
    self = [super init];
    if (self) {
        
        _builder = builder;
        
    }
    return self;
}

- (void)constructCPU:(NSString *)cpu mianboard:(NSString *)display
{
    [[[_builder builderCPU:cpu] builderDisplay:display] builder];
    
}


- (void)wsj_builder:(void (^)(id<IComputerBuilder>))buidlerBlock{
  
    buidlerBlock(_builder);
    
    [_builder builder];
    
}

@end
